﻿using System;
class ReverseDigits
{    
    static void ReverseDecimal(decimal number)    
    {
        string numberString = number.ToString();
        char[] numberChar = numberString.ToCharArray();
        char[] reversedNumberChar = new char[numberChar.Length];
        for (int i = 0; i < numberChar.Length; i++)
        {
            reversedNumberChar[numberChar.Length - i - 1] = numberChar[i];
        }
        for (int i = 0; i < reversedNumberChar.Length; i++)
        {
            if (reversedNumberChar[i] == 45)
            {
                break;

            }
            Console.Write(reversedNumberChar[i]);
        }
        Console.WriteLine();
    }
    static void Main()   
    {
        decimal num = decimal.Parse(Console.ReadLine());
        ReverseDecimal(num);    
    }    
    
 }
